Skip to main content

All Questions

Tagged with
0votes
1answer
170views

Using sed to search multiple strings in XML file

I need to filter a big file XML and find the string using a multiple conditions. I need a filter a email if cnisfCF equal true and natg_passwordAlreadyResetedPostMigration is true. Anyone can help ? &...
user341's user avatar
-2votes
2answers
776views

sed giving me this error: … unknown command: `

I have code which will replace the xml tag at a particular line number LineNum=`grep -n "Deep" file.xml | cut -d: -f 1 | awk -F '[\t]' '{$NF = $NF -1;}1'` sed "${LineNum}s#^<...
DEEP MUKHERJEE's user avatar
-2votes
1answer
400views

sed XML parse select text between tags with special characters while deleting other blocks

I am trying to parse an XML which consists of blocks between <JOB> and </JOB> , I am parsing within a do while loop , while reading the block between <JOB> and </JOB> , I am ...
sriram2207's user avatar
4votes
1answer
4kviews

How to replace "&" with "&amp;" except when already part of an XML entity?

I have a file (xml) with many &amp;/&lt;/&gt;/etc, but sometimes also some & characters by themselves. I want to change this symbol to &amp; without replacing the others. cat ...
Nips's user avatar
  • 245

close